﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace Ordering.Service.Contract
{
	#region CustomerItem class definition

	/// <summary>
	/// CustomerItem datacontract class.
	/// </summary>
	[DataContract(Namespace = "urn:Ordering.Service.Contract", IsReference = true), Serializable()]
	public partial class CustomerItem : System.Object 
	{
		/// <summary>
		/// Constructs a new CustomerItem datacontract instance.
		/// </summary>
		public CustomerItem()
			: base()
		{
			this.OnInstanceCreated();
		}
		
		partial void OnInstanceCreated();

		private System.Int32 _id;

		/// <summary>
		/// Id property.
		/// </summary>
		[DataMember()]
		public System.Int32 Id 
		{ 
			get
			{
				return this._id;
			}
			set 
			{
				this._id = value;
				this.OnAnIdentifierPropertyChanged();
				this.OnIdPropertyChanged(value);
				this.OnPropertyChanged("Id", value);
			}
		}

		partial void OnIdPropertyChanged(System.Int32 newValue);

		private System.String _name;

		/// <summary>
		/// Name property.
		/// </summary>
		[DataMember()]
		public System.String Name 
		{ 
			get
			{
				return this._name;
			}
			set 
			{
				this._name = value;
				this.OnNamePropertyChanged(value);
				this.OnPropertyChanged("Name", value);
			}
		}

		partial void OnNamePropertyChanged(System.String newValue);

		private System.String _email;

		/// <summary>
		/// Email property.
		/// </summary>
		[DataMember()]
		public System.String Email 
		{ 
			get
			{
				return this._email;
			}
			set 
			{
				this._email = value;
				this.OnEmailPropertyChanged(value);
				this.OnPropertyChanged("Email", value);
			}
		}

		partial void OnEmailPropertyChanged(System.String newValue);

		private System.String _address;

		/// <summary>
		/// Address property.
		/// </summary>
		[DataMember()]
		public System.String Address 
		{ 
			get
			{
				return this._address;
			}
			set 
			{
				this._address = value;
				this.OnAddressPropertyChanged(value);
				this.OnPropertyChanged("Address", value);
			}
		}

		partial void OnAddressPropertyChanged(System.String newValue);

		partial void OnPropertyChanged(string propertyName, object newValue);

		// For internal use only:
		partial void OnAnIdentifierPropertyChanged();
	}

	#endregion

	#region OrderDetail class definition

	/// <summary>
	/// OrderDetail datacontract class.
	/// </summary>
	[DataContract(Namespace = "urn:Ordering.Service.Contract", IsReference = true), Serializable()]
	public partial class OrderDetail : System.Object 
	{
		/// <summary>
		/// Constructs a new OrderDetail datacontract instance.
		/// </summary>
		public OrderDetail()
			: base()
		{
			this.OrderLines = new System.Collections.Generic.List<OrderLineDetail>();
			this.OnInstanceCreated();
		}
		
		partial void OnInstanceCreated();

		private System.Int32 _orderNumber;

		/// <summary>
		/// OrderNumber property.
		/// </summary>
		[DataMember()]
		public System.Int32 OrderNumber 
		{ 
			get
			{
				return this._orderNumber;
			}
			set 
			{
				this._orderNumber = value;
				this.OnAnIdentifierPropertyChanged();
				this.OnOrderNumberPropertyChanged(value);
				this.OnPropertyChanged("OrderNumber", value);
			}
		}

		partial void OnOrderNumberPropertyChanged(System.Int32 newValue);

		private System.Nullable<System.DateTime> _orderDate;

		/// <summary>
		/// OrderDate property.
		/// </summary>
		[DataMember()]
		public System.Nullable<System.DateTime> OrderDate 
		{ 
			get
			{
				return this._orderDate;
			}
			set 
			{
				this._orderDate = value;
				this.OnOrderDatePropertyChanged(value);
				this.OnPropertyChanged("OrderDate", value);
			}
		}

		partial void OnOrderDatePropertyChanged(System.Nullable<System.DateTime> newValue);

		private CustomerItem _customer;

		/// <summary>
		/// Customer property.
		/// </summary>
		[DataMember()]
		public CustomerItem Customer 
		{ 
			get
			{
				return this._customer;
			}
			set 
			{
				this._customer = value;
				this.OnCustomerPropertyChanged(value);
				this.OnPropertyChanged("Customer", value);
			}
		}

		partial void OnCustomerPropertyChanged(CustomerItem newValue);

		/// <summary>
		/// OrderLines property.
		/// </summary>
		[DataMember()]
		public System.Collections.Generic.List<OrderLineDetail> OrderLines { get; set; }

		partial void OnPropertyChanged(string propertyName, object newValue);

		// For internal use only:
		partial void OnAnIdentifierPropertyChanged();
	}

	#endregion

	#region OrderItem class definition

	/// <summary>
	/// OrderItem datacontract class.
	/// </summary>
	[DataContract(Namespace = "urn:Ordering.Service.Contract", IsReference = true), Serializable()]
	public partial class OrderItem : System.Object 
	{
		/// <summary>
		/// Constructs a new OrderItem datacontract instance.
		/// </summary>
		public OrderItem()
			: base()
		{
			this.ProductIds = new System.Collections.Generic.List<System.Int32>();
			this.ProductLabels = new System.Collections.Generic.List<System.String>();
			this.OnInstanceCreated();
		}
		
		partial void OnInstanceCreated();

		private System.Int32 _orderNumber;

		/// <summary>
		/// OrderNumber property.
		/// </summary>
		[DataMember()]
		public System.Int32 OrderNumber 
		{ 
			get
			{
				return this._orderNumber;
			}
			set 
			{
				this._orderNumber = value;
				this.OnAnIdentifierPropertyChanged();
				this.OnOrderNumberPropertyChanged(value);
				this.OnPropertyChanged("OrderNumber", value);
			}
		}

		partial void OnOrderNumberPropertyChanged(System.Int32 newValue);

		private System.Nullable<System.DateTime> _orderDate;

		/// <summary>
		/// OrderDate property.
		/// </summary>
		[DataMember()]
		public System.Nullable<System.DateTime> OrderDate 
		{ 
			get
			{
				return this._orderDate;
			}
			set 
			{
				this._orderDate = value;
				this.OnOrderDatePropertyChanged(value);
				this.OnPropertyChanged("OrderDate", value);
			}
		}

		partial void OnOrderDatePropertyChanged(System.Nullable<System.DateTime> newValue);

		private System.Int32 _customerId;

		/// <summary>
		/// CustomerId property.
		/// </summary>
		[DataMember()]
		public System.Int32 CustomerId 
		{ 
			get
			{
				return this._customerId;
			}
			set 
			{
				this._customerId = value;
				this.OnCustomerIdPropertyChanged(value);
				this.OnPropertyChanged("CustomerId", value);
			}
		}

		partial void OnCustomerIdPropertyChanged(System.Int32 newValue);

		private System.String _customerName;

		/// <summary>
		/// CustomerName property.
		/// </summary>
		[DataMember()]
		public System.String CustomerName 
		{ 
			get
			{
				return this._customerName;
			}
			set 
			{
				this._customerName = value;
				this.OnCustomerNamePropertyChanged(value);
				this.OnPropertyChanged("CustomerName", value);
			}
		}

		partial void OnCustomerNamePropertyChanged(System.String newValue);

		private System.Decimal _totalOrderPrice;

		/// <summary>
		/// TotalOrderPrice property.
		/// </summary>
		[DataMember()]
		public System.Decimal TotalOrderPrice 
		{ 
			get
			{
				return this._totalOrderPrice;
			}
			set 
			{
				this._totalOrderPrice = value;
				this.OnTotalOrderPricePropertyChanged(value);
				this.OnPropertyChanged("TotalOrderPrice", value);
			}
		}

		partial void OnTotalOrderPricePropertyChanged(System.Decimal newValue);

		/// <summary>
		/// ProductIds property.
		/// </summary>
		[DataMember()]
		public System.Collections.Generic.List<System.Int32> ProductIds { get; set; }

		/// <summary>
		/// ProductLabels property.
		/// </summary>
		[DataMember()]
		public System.Collections.Generic.List<System.String> ProductLabels { get; set; }

		partial void OnPropertyChanged(string propertyName, object newValue);

		// For internal use only:
		partial void OnAnIdentifierPropertyChanged();
	}

	#endregion

	#region OrderLineDetail class definition

	/// <summary>
	/// OrderLineDetail datacontract class.
	/// </summary>
	[DataContract(Namespace = "urn:Ordering.Service.Contract", IsReference = true), Serializable()]
	public partial class OrderLineDetail : System.Object 
	{
		/// <summary>
		/// Constructs a new OrderLineDetail datacontract instance.
		/// </summary>
		public OrderLineDetail()
			: base()
		{
			this.OnInstanceCreated();
		}
		
		partial void OnInstanceCreated();

		private System.Int32 _id;

		/// <summary>
		/// Id property.
		/// </summary>
		[DataMember()]
		public System.Int32 Id 
		{ 
			get
			{
				return this._id;
			}
			set 
			{
				this._id = value;
				this.OnAnIdentifierPropertyChanged();
				this.OnIdPropertyChanged(value);
				this.OnPropertyChanged("Id", value);
			}
		}

		partial void OnIdPropertyChanged(System.Int32 newValue);

		private ProductItem _product;

		/// <summary>
		/// Product property.
		/// </summary>
		[DataMember()]
		public ProductItem Product 
		{ 
			get
			{
				return this._product;
			}
			set 
			{
				this._product = value;
				this.OnProductPropertyChanged(value);
				this.OnPropertyChanged("Product", value);
			}
		}

		partial void OnProductPropertyChanged(ProductItem newValue);

		private System.Decimal _unitPrice;

		/// <summary>
		/// UnitPrice property.
		/// </summary>
		[DataMember()]
		public System.Decimal UnitPrice 
		{ 
			get
			{
				return this._unitPrice;
			}
			set 
			{
				this._unitPrice = value;
				this.OnUnitPricePropertyChanged(value);
				this.OnPropertyChanged("UnitPrice", value);
			}
		}

		partial void OnUnitPricePropertyChanged(System.Decimal newValue);

		private System.Int32 _quantity;

		/// <summary>
		/// Quantity property.
		/// </summary>
		[DataMember()]
		public System.Int32 Quantity 
		{ 
			get
			{
				return this._quantity;
			}
			set 
			{
				this._quantity = value;
				this.OnQuantityPropertyChanged(value);
				this.OnPropertyChanged("Quantity", value);
			}
		}

		partial void OnQuantityPropertyChanged(System.Int32 newValue);

		partial void OnPropertyChanged(string propertyName, object newValue);

		// For internal use only:
		partial void OnAnIdentifierPropertyChanged();
	}

	#endregion

	#region ProductItem class definition

	/// <summary>
	/// ProductItem datacontract class.
	/// </summary>
	[DataContract(Namespace = "urn:Ordering.Service.Contract", IsReference = true), Serializable()]
	public partial class ProductItem : System.Object 
	{
		/// <summary>
		/// Constructs a new ProductItem datacontract instance.
		/// </summary>
		public ProductItem()
			: base()
		{
			this.OnInstanceCreated();
		}
		
		partial void OnInstanceCreated();

		private System.Int32 _id;

		/// <summary>
		/// Id property.
		/// </summary>
		[DataMember()]
		public System.Int32 Id 
		{ 
			get
			{
				return this._id;
			}
			set 
			{
				this._id = value;
				this.OnAnIdentifierPropertyChanged();
				this.OnIdPropertyChanged(value);
				this.OnPropertyChanged("Id", value);
			}
		}

		partial void OnIdPropertyChanged(System.Int32 newValue);

		private System.String _label;

		/// <summary>
		/// Label property.
		/// </summary>
		[DataMember()]
		public System.String Label 
		{ 
			get
			{
				return this._label;
			}
			set 
			{
				this._label = value;
				this.OnLabelPropertyChanged(value);
				this.OnPropertyChanged("Label", value);
			}
		}

		partial void OnLabelPropertyChanged(System.String newValue);

		private System.String _description;

		/// <summary>
		/// Description property.
		/// </summary>
		[DataMember()]
		public System.String Description 
		{ 
			get
			{
				return this._description;
			}
			set 
			{
				this._description = value;
				this.OnDescriptionPropertyChanged(value);
				this.OnPropertyChanged("Description", value);
			}
		}

		partial void OnDescriptionPropertyChanged(System.String newValue);

		private System.Nullable<System.Decimal> _salePrice;

		/// <summary>
		/// SalePrice property.
		/// </summary>
		[DataMember()]
		public System.Nullable<System.Decimal> SalePrice 
		{ 
			get
			{
				return this._salePrice;
			}
			set 
			{
				this._salePrice = value;
				this.OnSalePricePropertyChanged(value);
				this.OnPropertyChanged("SalePrice", value);
			}
		}

		partial void OnSalePricePropertyChanged(System.Nullable<System.Decimal> newValue);

		partial void OnPropertyChanged(string propertyName, object newValue);

		// For internal use only:
		partial void OnAnIdentifierPropertyChanged();
	}

	#endregion

}